package com.sne.airways.system.constants;

import java.util.Arrays;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: skyline{http://my.oschina.net/skyline520}
 * Date: 12-11-16
 * Time: 下午5:50
 * To change this template use File | Settings | File Templates.
 */
public enum StatusType {
    启用("1","启用"),
    冻结("0","冻结");

    private String value;
    private String label;

    StatusType(String value, String label) {
        this.value = value;
        this.label = label;
    }

    public String getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    public static List getStatusTypeList(){
        return Arrays.asList(values());
    }

    public static String getLabel(String value){
        for(StatusType type : values()){
            if(value.equals(type.getValue())){
                return type.getLabel();
            }
        }
        return null;
    }
}
